#include<stdio.h>
/*int main()
{
	int n = 0;
	while(scanf("%d", &n)==1)
	{
		for(int i = 0; i < n; i++)
		{
			for(int j = 0; j < n - i; j++)
			{
				printf("  ");
			}
			for(int j = 0; j <= i; j++)
			{
				printf("*");
			}
			printf("\n");
		}
		
		for(int i = 0; i < n + 1; i++)
		{
			for(int j = 0; j < i; j++)
			{
				printf("  ");
			}
			for(int j = 0; j < n + 1 - i; j++)
			{
				printf("*");
			}
			printf("\n");
		}
	}
	return 0;
}*/


int main()
{
	int n = 0;
	int score = 0;
	int max = 100;
	int min = 0;
	int sum = 0;
	while(scanf("%d", &score) == 1)
	{
		n++;
		if(score > max)
		{
			max = score;
		}
		if(score < min)
		{
			min = score;
		}
		sum+=score;
		if(n==7)
		{
			printf("%.2lf\n", 1.0*(sum-max-min) / (n - 2));
			n=0;
			max = 100;
			min = 0;
			sum = 0;
		}
	}
	return 0;
}
